<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>

<html>
<head>
<title>AJAX.html</title>
<script type="text/javascript" src="js/jquery-1.7.2.js"></script>

<script type="text/javascript">
// $.ajax
// $.get
// $.post
// $.load
// $.getJSON
// $.getScript
      
 	 $(function(){
		// $('#ajaxContent').load('login3');
		/*
		$.ajax({
			url: 'login3',
			method: 'get',
			success: function(data) {
				$('#ajaxContent').html(data);
			}
		});*/
		/*
		$.get('login3', function(data) {
			$('#ajaxContent').html(data);
		});
		*/
		
		
 		//最经典的写法
		$.ajax({
			url: 'json2',
			method: 'get',
			data: {
				username: 'caixinjiang',
				no: '351534'
			},
			success: function(data) {
				$('#ajaxContent').html(data[0] + '--------' + data[1]);
			}
		});
	});  
	 
 	$(function(){
			
	  $.ajax({
		  url:'json3',
		  method:'get',
		  data:{
			  username:'邓伟瀚',
			  id:'1234333'
		  },
		  success: function(data){
			  $('#ajaxContent').html(data[0]+'------'+data[1]);
		  }
	  });
	}); 
	<%System.out.println("2");%>
	
</script>
</head>
<body>
<h2>ajax test</h2>
<div id="ajaxContent">
</div>

</body>
</html>